Eclipse Platform
Pre-release 3.0

org.eclipse.ui
Class SelectionEnabler

java.lang.Object
  extended byorg.eclipse.ui.SelectionEnabler

public final class SelectionEnabler
extends Object

Determines the enablement status given a selection. This calculation is done based on the definition of the enablesFor attribute, enablement element, and the selection element found in the IConfigurationElement provided.

This class can be instantiated by clients. It is not intended to be extended.

Since:
3.0

Nested Class Summary
static class SelectionEnabler.SelectionClass
           
 
Field Summary
static int ANY_NUMBER
           
static int MULTIPLE
           
static int NONE
           
static int NONE_OR_ONE
           
static int ONE_OR_MORE
           
static int UNKNOWN
           
 
Constructor Summary
SelectionEnabler(IConfigurationElement configElement)
          ActionEnabler constructor.
 
Method Summary
 boolean isEnabledForSelection(ISelection selection)
          Returns true if the given selection matches the conditions specified in IConfirgurationElement.
static boolean verifyNameMatch(String name, String filter)
          Verifies that the given name matches the given wildcard filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

ONE_OR_MORE

public static final int ONE_OR_MORE
See Also:
Constant Field Values

ANY_NUMBER

public static final int ANY_NUMBER
See Also:
Constant Field Values

NONE_OR_ONE

public static final int NONE_OR_ONE
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

MULTIPLE

public static final int MULTIPLE
See Also:
Constant Field Values
Constructor Detail

SelectionEnabler

public SelectionEnabler(IConfigurationElement configElement)
ActionEnabler constructor.

Method Detail

isEnabledForSelection

public boolean isEnabledForSelection(ISelection selection)
Returns true if the given selection matches the conditions specified in IConfirgurationElement.


verifyNameMatch

public static boolean verifyNameMatch(String name,
                                      String filter)
Verifies that the given name matches the given wildcard filter. Returns true if it does.


Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.